package resfoods.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.entity.AddrInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface AddrInfoDao extends BaseMapper<AddrInfo> {

    @Select("select * from addrinfo where mno= #{mno}")
    List<AddrInfo> findbymno(Integer mno);

    @Insert("insert into addrinfo(ano, mno, name, tel, province, city, area, addr, flag, status) " +
            "VALUES (#{ano},#{mno},#{name},#{tel},#{province},#{city},#{area},#{addr},1,1)")
    int add(AddrInfo addrInfo);

}
